SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[FormasPagosInsertCommand]
(
	@ID numeric(10, 0),
	@FORMA_PAGO varchar(100),
	@PLAZO numeric(10, 0)
)
AS
	SET NOCOUNT OFF;
DECLARE @I NUMERIC(10,0) = (SELECT(ISNULL(MAX(FORMAS_PAGOS.ID),0))+1 FROM FORMAS_PAGOS);

INSERT INTO [FORMAS_PAGOS] ([ID], [FORMA_PAGO], [PLAZO]) VALUES (@I, @FORMA_PAGO, @PLAZO);
	
SELECT ID, FORMA_PAGO, PLAZO FROM FORMAS_PAGOS WHERE (ID = @I)
GO
